xtask\tasks\fuzz/
onefuzz_schema.rs

1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3
4//
5// Note: This is not the full schema, just the parts we use.
6
7use serde::Serialize;
8
9#[derive(Serialize)]
10#[serde(rename_all = "PascalCase")]
11pub struct OneFuzzConfigV3 {
12    /// Must be 3.
13    pub config_version: u32,
14    pub entries: Vec<Entry>,
15}
16
17#[derive(Serialize)]
18#[serde(rename_all = "PascalCase")]
19pub struct Entry {
20    pub job_notification_email: String,
21    pub fuzzer: Fuzzer,
22    pub job_dependencies: Vec<String>,
23    pub one_fuzz_jobs: Vec<OneFuzzJob>,
24    pub ado_template: AdoTemplate,
25}
26
27#[derive(Serialize)]
28#[serde(rename_all = "PascalCase")]
29pub struct Fuzzer {
30    #[serde(rename = "$type")]
31    pub type_field: String,
32    pub sources_allow_list_path: String,
33    pub fuzzing_harness_executable_name: String,
34}
35
36#[derive(Serialize)]
37#[serde(rename_all = "PascalCase")]
38pub struct OneFuzzJob {
39    pub project_name: String,
40    pub target_name: String,
41    #[serde(skip_serializing_if = "Vec::is_empty")]
42    pub target_options: Vec<String>,
43}
44
45#[derive(Serialize)]
46#[serde(rename_all = "PascalCase")]
47pub struct AdoTemplate {
48    pub org: String,
49    pub project: String,
50    pub assigned_to: String,
51    pub area_path: String,
52    pub iteration_path: String,
53    pub ado_fields: AdoFields,
54}
55
56#[derive(Serialize)]
57#[serde(rename_all = "PascalCase")]
58pub struct AdoFields {
59    /// Comma separated list.
60    #[serde(rename = "System.Tags")]
61    pub tags: String,
62}